<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>search</title>
    </head>
    <body>
        <div class="body">
            <h1>${person.name}</h1>
            <g:if test="${flash.message}">
            	<div class="message">${flash.message}</div>
            </g:if>
			
			<table><tr>            
			<td>
			<fieldset>
			<legend>[ 基本資料 ]</legend>
            <table>
            	<tr class="mouseOver"><td>認證號碼</td><td>${person.uid}</td></tr>
	            <tr class="mouseOver"><td>姓名</td><td>${person.name}</td></tr>
			    <tr class="mouseOver"><td>surname</td><td>${person.surname}</td></tr>
			    <tr class="mouseOver"><td>運動項目</td><td>${person.sport.name}</td></tr>
			    <tr class="mouseOver"><td>國家</td><td>${person.nation.name}</td></tr>
			    <tr class="mouseOver"><td>性別 </td><td>${person.sex}</td></tr>
			    <tr class="mouseOver"><td>category </td><td>${person.category}</td></tr>
			    <tr class="mouseOver"><td>預計抵達時間 </td><td>${person.comeDateAt?.format("MM-dd HH:mm")}</td></tr>
			    <tr class="mouseOver"><td>抵達班機 </td><td>${person.comeFlight}</td></tr>
			    <tr class="mouseOver"><td>抵達機場 </td><td>${person.comeAirport?.name}</td></tr>
			    <tr class="mouseOver"><td>預計離開時間 </td><td>${person.goDateAt?.format("MM-dd HH:mm")}</td></tr>
			    <tr class="mouseOver"><td>離開班機 </td><td>${person.goFlight}</td></tr>
			    <tr class="mouseOver"><td>離開機場 </td><td>${person.goAirport?.name}</td></tr>
			    <tr class="mouseOver"><td>備註 </td><td>${person.note}</td></tr>
            </table>
			</fieldset>

			</td><td>

			<fieldset>
			<legend>[ 抵離情況  ]</legend>
			<table>
			<tr><td>地點</td><td>時間</td></tr>
			<tr><td>抵達桃園機場</td><td><g:if test="${person.nAirportComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.nAirportComeAt}" /></g:if></td></tr>
			<tr><td>抵達桃園高鐵</td><td><g:if test="${person.nTrainComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.nTrainComeAt}" /></g:if></td></tr>
			<tr><td>抵達左營高鐵</td><td><g:if test="${person.sTrainComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.sTrainComeAt}" /></g:if></td></tr>
			<tr><td>抵達認證中心</td><td><g:if test="${person.centerComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.centerComeAt}" /></g:if></td></tr>
			<tr><td>抵達旅館</td><td><g:if test="${person.hotelComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.hotelComeAt}" /></g:if></td></tr>
			<tr><td></td><td></td></tr>
			<tr><td>離開旅館</td><td><g:if test="${person.hotelGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.hotelGoAt}" /></g:if></td></tr>
			<tr><td>離開左營高鐵</td><td><g:if test="${person.sTrainGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.sTrainGoAt}" /></g:if></td></tr>
			<tr><td>離開小港機場</td><td><g:if test="${person.sAirportGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.sAirportGoAt}" /></g:if></td></tr>
			<tr><td>離開桃園高鐵</td><td><g:if test="${person.nTrainGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.nTrainGoAt}" /></g:if></td></tr>
			<tr><td>離開桃園機場</td><td><g:if test="${person.nAirportGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.nAirportGoAt}" /></g:if></td></tr>
			</table>
			</fieldset>
			
			</td><td>
			
			<fieldset>
			<legend>[ 異動紀錄  ]</legend>
			<table>
				<tr>
            		<td>更新時間</td>
            		<td>更新人員</td>
            		<td>更新欄位</td>
            		<td>更新前</td>
            		<td>更新後</td>
            	</tr>
				<g:each var="history" in="${histories}">
				<tr class="mouseOver">
					<td><g:formatDate format="MM-dd HH:mm" date="${history.createdDate}" /></td>
            		<td><g:link action="show" id="${history.person.id}">${history.person.name}</g:link></td>
            		<td>${history.fieldName}</td>
            		<td>${history.beforeValue}</td>
            		<td>${history.afterValue}</td>
				</tr>
				</g:each>
			</table>
			</fieldset>
			
			</td>
			</tr></table>
        </div>
    </body>
</html>
